program to find largest and smallest element of array in c